jade.content
Class ContentManager

java.lang.Object
  |
  +--jade.content.ContentManager

public class ContentManager
extends java.lang.Object
implements Serializable

The content manager associated with an agent.

Author:
Federico Bergenti
See Also:
Serialized Form

Constructor Summary
ContentManager()
           
 
Method Summary
 AbsContentElement extractAbsContent(ACLMessage msg)
          Extracts an abstract descriptor of the content from a message.
 ContentElement extractContent(ACLMessage msg)
          Retrieves the content of a message as a concrete object.
 void fillContent(ACLMessage msg, AbsContentElement content)
          Fills the content of a message.
 void fillContent(ACLMessage msg, ContentElement content)
          Fills the content of a message.
 void registerLanguage(Codec c)
          Registers a codec c.
 void registerLanguage(Codec c, java.lang.String name)
          Registers a language, i.e., a codec c plus a name.
 void registerOntology(Ontology o)
          Registers an ontology.
 void registerOntology(Ontology o, java.lang.String name)
          Registers an ontology with a given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentManager

public ContentManager()
Method Detail

registerLanguage

public void registerLanguage(Codec c)
Registers a codec c.
Parameters:
c - the codec.

registerLanguage

public void registerLanguage(Codec c,
                             java.lang.String name)
Registers a language, i.e., a codec c plus a name.
Parameters:
c - the codec.
name - the name.

registerOntology

public void registerOntology(Ontology o)
Registers an ontology.
Parameters:
o - the ontology.

registerOntology

public void registerOntology(Ontology o,
                             java.lang.String name)
Registers an ontology with a given name.
Parameters:
o - the ontology.
name - the name.

fillContent

public void fillContent(ACLMessage msg,
                        AbsContentElement content)
                 throws Codec.CodecException,
                        OntologyException
Fills the content of a message.
Parameters:
msg - the message
content - the content.
Throws:
CodecException -  
OntologyException -  

extractAbsContent

public AbsContentElement extractAbsContent(ACLMessage msg)
                                    throws Codec.CodecException,
                                           OntologyException
Extracts an abstract descriptor of the content from a message.
Parameters:
msg - the message
Returns:
the content as an abstract descriptor.
Throws:
CodecException -  
OntologyException -  
See Also:
jade.content.Ontology

fillContent

public void fillContent(ACLMessage msg,
                        ContentElement content)
                 throws Codec.CodecException,
                        OntologyException
Fills the content of a message.
Parameters:
msg - the message
content - the content.
Throws:
CodecException -  
OntologyException -  

extractContent

public ContentElement extractContent(ACLMessage msg)
                              throws Codec.CodecException,
                                     OntologyException
Retrieves the content of a message as a concrete object.
Parameters:
msg - the message
Returns:
the content.
Throws:
CodecException -  
OntologyException -  
See Also:
jade.content.Ontology